package com.longlong.cli;

import picocli.CommandLine;

import java.util.concurrent.Callable;


@CommandLine.Command(name = "sub", description = "减法运算", mixinStandardHelpOptions = true)

public class SubCommand implements Callable<Integer> {

    @CommandLine.Parameters(index = "0", description = "被减数")
    private int a;

    @CommandLine.Parameters(index = "1", description = "减数")
    private int b;

    @Override
    public Integer call() throws Exception {
        System.out.println(a + " - " + b + " = " + (a - b));
        return 0;
    }
}
